package com.dyoud.api.shop.service;

import org.springframework.stereotype.Service;

import com.alibaba.dubbo.config.annotation.Reference;
import com.dyoud.api.shop.shopInfo.dto.ShopPicDto;
import com.dyoud.core.DozerUtils;
import com.dyoud.shop.api.request.ShopPicRequest;
import com.dyoud.shop.api.service.ShopPicService;

/***
 * 
 * @author wangshuaifei
 * @date 2018/03/05
 *
 */
@Service
public class ShopPicApiService {

    @Reference
    private ShopPicService shopPicService;
    
    
    /***
     * 添加 店铺图片
     * 
     * @param shopPic
     * @return
     */
    public boolean addShopPic(ShopPicDto dto) {
        ShopPicRequest shopPic = new ShopPicRequest();
        DozerUtils.copy(dto, shopPic);
        return shopPicService.addShopPic(shopPic) > 0;
    }
}
